package com.gzy.rpsm_property.mapper;

import com.gzy.rpsm_property.pojo.Reply;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ReplyMapper {
    @Insert("INSERT INTO reply (reply_id, message_id, reply_user_name,reply_message_title, reply_message_content, reply_time) " +
            "VALUES (#{replyId}, #{messageId}, #{replyMessageTitle}, #{replyUserName},#{replyMessageContent}, #{replyTime})")
    void insertReply(Reply reply);

    @Select("SELECT * FROM reply WHERE message_id = #{messageId}")
    List<Reply> getRepliesByMessageId(int messageId);
}
